


$.ajax({
    url: '/api/list',
    success(result) {
        let templateStr = `
            <ul>
                {{each data}}
                <li>{{$value}}</li>
                {{/each}}
            </ul>
        `

        console.log(result)
        let html = template.render(templateStr, {data: result.data})
        console.log(html)
        $('#list').html(html)
    }
})
